package com.lagou.rocket.demo.order.service;

import com.lagou.rocket.demo.order.model.Order;

/**
 * <p>
 *
 * </p>
 *
 * @author KK
 * @since 2021-11-07
 */
public interface IOrderService {


    Order save(Order order);

    Order getOne(Long id);

    /**
     * 检查订单状态， 如果还是未支付， 则修改未超时未支付， 并恢复库存
     * @param orderId
     * @return
     */
    String checkOrderStatusAndRestoreInventoryIfNeeded(Long orderId);



    String getOrderStatus(Long id);

    String pay(
            Long userId, Long id
    );

}
